// 导入需要的config和request
import confing from '../config/config.js';
import request from '../util/request.js';
// 申明请求对象
const processContentRequest = {
    // dict请求的基本url
    BASE_URL :  confing.PRO_URL + "/processContent",
    //全部分页请求
    get(page = 1,limit = 10,processCode,callback){
        console.log(processCode);
        // url
        let url = this.BASE_URL + "/get?page=" + page + "&limit=" + limit+ "&processCode="+processCode;
        // 发送请求
        console.log("aaaaaaaa"+url);
        request.get(url,callback);
    },
    //新增工单
    save(processContent,callback){
       let url=this.BASE_URL+'/save';
       request.post(url,processContent,callback);
    },
    deleteProcessContent(contentId,callback){
        request.delete(this.BASE_URL+"/deleteProcessContent?contentId="+contentId,callback);
    },
    selectByprocessCode(processCode,callback){
        console.log(processCode);
        // url
        let url = this.BASE_URL + "/selectByprocessCode?&processCode="+processCode;
        // 发送请求
        console.log("aaaaaaaa"+url);
        request.get(url,callback);
    },
    updateProcessContent(processContent,callback){
        let url=this.BASE_URL+'/update';
       request.post(url,processContent,callback);
    },

}

// 将dictRequest暴漏出去
export default processContentRequest;